package com.example.anquan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Controller
public class IndexController {
    @GetMapping("/{type}/{path}")
    public String toDetail(@PathVariable("type")String type,
                           @PathVariable("path")String path){
        return "/"+type+"/"+path;
    }
    @GetMapping("/login")
    public String toLoginPage(){
        return "/login";
    }
    @GetMapping("/index")
    public String toIndexPage(){
        return "/index";
    }
    @GetMapping("/logout")
    public String toLogoutPage(){
        return "/logout";
    }
}
